import router from "./router";
import NProgress from 'nprogress' // 进度条
import 'nprogress/nprogress.css' 

router.beforeEach(async (to, from, next) => {
    NProgress.start()
    if (to.path === from.path && ![to.path, from.path].includes('/')) return;
    else next()
});

router.afterEach(async (to) => {
    NProgress.done()
});
